home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin MDIForm MDIForm1
- Caption = "Sample code for ACTIVE Form & Control"
- ClientHeight = 4020
- ClientLeft = 1500
- ClientTop = 2460
- ClientWidth = 7365
- Height = 4710
- Left = 1440
- LinkTopic = "MDIForm1"
- Top = 1830
- Width = 7485
- Begin PictureBox Picture1
- Align = 1 'Align Top
- Height = 525
- Left = 0
- ScaleHeight = 495
- ScaleWidth = 7335
- TabIndex = 0
- Top = 0
- Visible = 0 'False
- Width = 7365
- Begin CommonDialog CMDialog1
- Left = 1560
- Top = 0
- End
- End
- Begin Menu mnuFontChange
- Caption = "Fonts..."
- End
- Sub MDIForm_Load ()
- 'show the two children forms
- form2.Show
- form1.Show
- 'populate the two list boxes with sample trash
- For C = 1 To 20
- form1.List1.AddItem "Item #" + Str$(C)
- form2.List1.AddItem "Item #" + Str$(C)
- Next
- 'arrange the two forms in vertical tile mode
- mdiForm1.Arrange 2
- End Sub
- Sub mnuFontChange_Click ()
- 'Sample code compliments of: Frederick Volking
- 'Contact via: AOL= FVolking
- ' CIS= 72000,2337
- 'setup the incomming default value
- cmDialog1.FontName = ActiveForm.ActiveControl.FontName
- cmDialog1.FontSize = ActiveForm.ActiveControl.FontSize
- cmDialog1.FontBold = ActiveForm.ActiveControl.FontBold
- cmDialog1.FontItalic = ActiveForm.ActiveControl.FontItalic
- 'make sure the Font Dialog shows only valid fonts
- cmDialog1.Flags = &H1 + &H400 + &H1000
- 'activate the common dialog box in Font Mode
- cmDialog1.Action = 4
- 'put selection into currently Active Form & Control
- ActiveForm.ActiveControl.FontName = cmDialog1.FontName
- ActiveForm.ActiveControl.FontSize = cmDialog1.FontSize
- ActiveForm.ActiveControl.FontBold = cmDialog1.FontBold
- ActiveForm.ActiveControl.FontItalic = cmDialog1.FontItalic
- End Sub
-